<style>
    .layui-form-label{
        width: 100px;
    }
    .grey{
        background: #eeeeee;
    }
</style>

<div class="layui-form" lay-filter="layui-purchaseplan-edit-form-list" id="layui-purchaseplan-edit-form-list"style="padding: 20px 30px 0 0;">
    <div class="layui-form-item">
        <label class="layui-form-label">采购计划单号</label>
        <div class="layui-input-inline">
            <script type="text/html" template>
                <input type="text" name="purchase_plan_sn" value="{{ d.params.purchase_plan_sn || '' }}" disabled autocomplete="off" class="layui-input grey">
            </script>
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">店铺名称</label>
        <div class="layui-input-inline">
            <script type="text/html" template>
                <input type="text" name="base_shop_name" value="{{ d.params.base_shop_name || '' }}" disabled autocomplete="off" class="layui-input grey">
            </script>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">SKU</label>
        <div class="layui-input-inline">
            <script type="text/html" template>
                <input type="text" name="sku" value="{{ d.params.sku || '' }}" disabled autocomplete="off" class="layui-input grey">
            </script>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">SKU中文名称</label>
        <div class="layui-input-inline">
            <script type="text/html" template>
                <input type="text" name="sku_name" value="{{ d.params.sku_name || '' }}" disabled autocomplete="off" class="layui-input grey">
            </script>
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">理论需求量</label>
        <div class="layui-input-inline">
            <script type="text/html" template>
                <input type="text" name="need_quantity" onkeyup="clearNoNum(this)" value="{{ d.params.need_quantity || '' }}" lay-verify="required" placeholder="请输入理论需求量" autocomplete="off" class="layui-input">
            </script>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">实际下单数量</label>
        <div class="layui-input-inline">
            <script type="text/html" template>
                <input type="text" name="quantity" onkeyup="clearNoNum(this)" value="{{ d.params.quantity || '' }}" lay-verify="required" placeholder="请输入实际下单数量" autocomplete="off" class="layui-input">
            </script>
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label" style="margin-bottom: -55px">首批到货日期</label>
        <div class=" layui-input-block layui-jy-datetime">
            <input type="text" name="arrive_time" id="arrive_time" style="margin-left: 20px;width: 191px" value="{{ d.params.arrive_time || '' }}" lay-verify="required" placeholder="" autocomplete="off" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">批次</label>
        <div class="layui-input-inline">
            <script type="text/html" template>
                <input type="text" name="batch" onkeyup="clearNoNum(this)" value="{{ d.params.batch || '' }}" lay-verify="required" placeholder="请输入批次" autocomplete="off" class="layui-input">
            </script>
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">间隔日期(天)</label>
        <div class="layui-input-inline">
            <script type="text/html" template>
                <input type="text" name="interval_day" onkeyup="clearNoNum(this)" value="{{ d.params.interval_day || '' }}" lay-verify="required" placeholder="请输入间隔日期(天)" autocomplete="off" class="layui-input">
            </script>
        </div>
    </div>

    <script type="text/html" template>
        <input type="hidden" name="id" value="{{ d.params.id || '' }}">
    </script>
    <div class="layui-form-item">
        <label class="layui-form-label"></label>
        <div class="layui-input-inline">
            <input type="button" lay-submit lay-filter="layuiadmin-app-form-submit" value="确认" class="layui-btn">
        </div>
    </div>
</div>
<script type="text/javascript">
    /*数据校验*/
    function clearNoNum(obj) {
        var reg=/^([1-9]\d*|[0]{1,1})$/; //含0正整数
        if(!reg.test(obj.value)) obj.value = "";
    }
</script>
